﻿
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:FeedbackBrowser">
    <ControlTemplate x:Key="SlickButtonTemplate" TargetType="{x:Type local:SlickToggleButton}">
        <Grid>
            <Border x:Name="ButtonBackgroundBorder" CornerRadius="{Binding Path=CornerRadius, RelativeSource={RelativeSource TemplatedParent}}" Background="{Binding Path=HighlightBackground, RelativeSource={RelativeSource TemplatedParent}}" Opacity="0" BorderBrush="Black" BorderThickness="1"></Border>
            <Border x:Name="ButtonEdgesBorder" CornerRadius="{Binding Path=CornerRadius, RelativeSource={RelativeSource TemplatedParent}}" Opacity="1" BorderBrush="Black" BorderThickness="1" >
                <Border.BitmapEffect>
                    <DropShadowBitmapEffect Color="#FFFFFFFF" Direction="270" ShadowDepth=".75" Softness="0.20"/>
                </Border.BitmapEffect>
            </Border>
            <Border x:Name="ButtonContentBorder" CornerRadius="{Binding Path=CornerRadius, RelativeSource={RelativeSource TemplatedParent}}" Opacity="1" BorderThickness="1">
                <ContentPresenter Width="Auto" Height="Auto"  HorizontalAlignment="Center" VerticalAlignment="Center"></ContentPresenter>
            </Border>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Trigger.Setters>
                    <Setter Property="Opacity" TargetName="ButtonBackgroundBorder" Value="1"></Setter>
                </Trigger.Setters>
            </Trigger>
            <Trigger Property="IsChecked" Value="True">
                <Trigger.Setters>
                    <Setter Property="Opacity" TargetName="ButtonBackgroundBorder" Value="1"></Setter>
                    <Setter Property="Background" TargetName="ButtonBackgroundBorder" Value="{Binding Path=PressedBackground, RelativeSource={RelativeSource TemplatedParent}}"></Setter>
                </Trigger.Setters>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    <Style x:Key="SlickButton" TargetType="{x:Type ToggleButton}">
        <Setter Property="Template" Value="{StaticResource SlickButtonTemplate}" />
    </Style>
</ResourceDictionary>